﻿namespace HRM.CORE.REPORT
{
    using APP.HELPER.Utils.Security;
    using DevExpress.Utils;
    using DevExpress.XtraEditors;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using Dictionary.ERP;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Printing;

    public class rptListEmployee1 : XtraReport
    {
        private BottomMarginBand BottomMargin;
        private XRLabel chSex;
        private IContainer components;
        private DetailBand Detail;
        private HRM_EMPLOYEE l_Employee;
        private LabelControl labelControl1;
        private LabelControl labelControl2;
        private LabelControl labelControl3;
        private LabelControl labelControl4;
        private LabelControl labelControl5;
        private LabelControl lcHeaderText1;
        private string m_Code;
        private DateTime m_Date;
        private string m_EmployeeCode;
        private int m_Level;
        private XRPictureBox ptEmployeePhoto;
        private XRPictureBox ptLogo;
        private ReportFooterBand ReportFooter;
        private ReportHeaderBand ReportHeader;
        private TopMarginBand TopMargin;
        private XRLabel txtAddress;
        private XRLabel txtCompany;
        private XRLabel txtEmail;
        private XRLabel txtEmployeeCode;
        private XRLabel txtFax;
        private XRLabel txtTel;
        private XRLabel txtUnit;
        private XRLabel txtWebsite;
        private WinControlContainer winControlContainer11;
        private WinControlContainer winControlContainer13;
        private WinControlContainer winControlContainer2;
        private WinControlContainer winControlContainer6;
        private WinControlContainer winControlContainer7;
        private WinControlContainer winControlContainer9;
        private XRLabel xrLabel1;
        private XRLabel xrLabel10;
        private XRLabel xrLabel11;
        private XRLabel xrLabel2;
        private XRLabel xrLabel3;
        private XRLabel xrLabel4;
        private XRLabel xrLabel5;
        private XRLabel xrLabel6;
        private XRLabel xrLabel7;
        private XRLabel xrLabel8;
        private XRLabel xrLabel9;
        private XRLabel xrLbAddress;
        private XRLabel xrLbBirthDay;
        private XRLabel xrLbEmployeeName;
        private XRLabel xrLbIDCard;
        private XRLabel xrLbPhone;
        private XRLabel xrLbPosition;
        private XRLabel xrLbSalary;
        private XRLine xrLine1;
        private XRPanel xrPanel1;

        public rptListEmployee1(string EmployeeCode)
        {
            this.components = null;
            this.l_Employee = new HRM_EMPLOYEE();
            this.m_Level = 0;
            this.m_Code = "";
            this.m_EmployeeCode = "";
            this.m_Date = DateTime.Now;
            this.InitializeComponent();
            this.m_EmployeeCode = EmployeeCode;
        }

        public rptListEmployee1(int Level, string Code)
        {
            this.components = null;
            this.l_Employee = new HRM_EMPLOYEE();
            this.m_Level = 0;
            this.m_Code = "";
            this.m_EmployeeCode = "";
            this.m_Date = DateTime.Now;
            this.InitializeComponent();
            this.m_Level = Level;
            this.m_Code = Code;
        }

        private void chkSex_BeforePrint(object sender, PrintEventArgs e)
        {
            if (Convert.ToBoolean(this.chSex.Text))
            {
                this.chSex.Text = "Nam";
            }
            else
            {
                this.chSex.Text = "Nữ";
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.Detail = new DetailBand();
            this.ptEmployeePhoto = new XRPictureBox();
            this.xrLabel11 = new XRLabel();
            this.xrLabel10 = new XRLabel();
            this.xrLabel9 = new XRLabel();
            this.xrLabel8 = new XRLabel();
            this.xrLabel7 = new XRLabel();
            this.xrLabel6 = new XRLabel();
            this.xrLabel5 = new XRLabel();
            this.xrLabel4 = new XRLabel();
            this.xrLabel3 = new XRLabel();
            this.xrLabel2 = new XRLabel();
            this.xrLabel1 = new XRLabel();
            this.xrLine1 = new XRLine();
            this.chSex = new XRLabel();
            this.xrLbPosition = new XRLabel();
            this.xrLbSalary = new XRLabel();
            this.xrLbPhone = new XRLabel();
            this.xrLbAddress = new XRLabel();
            this.xrLbIDCard = new XRLabel();
            this.xrLbBirthDay = new XRLabel();
            this.xrLbEmployeeName = new XRLabel();
            this.txtEmployeeCode = new XRLabel();
            this.TopMargin = new TopMarginBand();
            this.winControlContainer2 = new WinControlContainer();
            this.lcHeaderText1 = new LabelControl();
            this.BottomMargin = new BottomMarginBand();
            this.ReportHeader = new ReportHeaderBand();
            this.xrPanel1 = new XRPanel();
            this.txtCompany = new XRLabel();
            this.txtUnit = new XRLabel();
            this.ptLogo = new XRPictureBox();
            this.txtWebsite = new XRLabel();
            this.txtEmail = new XRLabel();
            this.txtFax = new XRLabel();
            this.txtTel = new XRLabel();
            this.txtAddress = new XRLabel();
            this.winControlContainer13 = new WinControlContainer();
            this.labelControl5 = new LabelControl();
            this.winControlContainer11 = new WinControlContainer();
            this.labelControl4 = new LabelControl();
            this.winControlContainer9 = new WinControlContainer();
            this.labelControl3 = new LabelControl();
            this.winControlContainer7 = new WinControlContainer();
            this.labelControl2 = new LabelControl();
            this.winControlContainer6 = new WinControlContainer();
            this.labelControl1 = new LabelControl();
            this.ReportFooter = new ReportFooterBand();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { 
                this.ptEmployeePhoto, this.xrLabel11, this.xrLabel10, this.xrLabel9, this.xrLabel8, this.xrLabel7, this.xrLabel6, this.xrLabel5, this.xrLabel4, this.xrLabel3, this.xrLabel2, this.xrLabel1, this.xrLine1, this.chSex, this.xrLbPosition, this.xrLbSalary, 
                this.xrLbPhone, this.xrLbAddress, this.xrLbIDCard, this.xrLbBirthDay, this.xrLbEmployeeName, this.txtEmployeeCode
             });
            this.Detail.HeightF = 182f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.ptEmployeePhoto.BorderColor = Color.WhiteSmoke;
            this.ptEmployeePhoto.Borders = BorderSide.All;
            this.ptEmployeePhoto.LocationFloat = new PointFloat(22.00001f, 8.000059f);
            this.ptEmployeePhoto.Name = "ptEmployeePhoto";
            this.ptEmployeePhoto.SizeF = new SizeF(143.75f, 118.2917f);
            this.ptEmployeePhoto.Sizing = ImageSizeMode.ZoomImage;
            this.ptEmployeePhoto.StylePriority.UseBorderColor = false;
            this.ptEmployeePhoto.StylePriority.UseBorders = false;
            this.ptEmployeePhoto.BeforePrint += new PrintEventHandler(this.ptEmployeePhoto_BeforePrint);
            this.xrLabel11.ForeColor = Color.Silver;
            this.xrLabel11.LocationFloat = new PointFloat(22.00001f, 58.33333f);
            this.xrLabel11.Name = "xrLabel11";
            this.xrLabel11.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel11.SizeF = new SizeF(143.75f, 17.70833f);
            this.xrLabel11.StylePriority.UseForeColor = false;
            this.xrLabel11.StylePriority.UseTextAlignment = false;
            this.xrLabel11.Text = "Ảnh";
            this.xrLabel11.TextAlignment = TextAlignment.MiddleCenter;
            this.xrLabel10.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel10.LocationFloat = new PointFloat(175.2917f, 133f);
            this.xrLabel10.Name = "xrLabel10";
            this.xrLabel10.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel10.SizeF = new SizeF(85.66663f, 22.99998f);
            this.xrLabel10.StylePriority.UseFont = false;
            this.xrLabel10.Text = "Chức vụ:";
            this.xrLabel9.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel9.LocationFloat = new PointFloat(502.2498f, 133f);
            this.xrLabel9.Name = "xrLabel9";
            this.xrLabel9.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel9.SizeF = new SizeF(98.95834f, 22.99998f);
            this.xrLabel9.StylePriority.UseFont = false;
            this.xrLabel9.Text = "Chuy\x00ean m\x00f4n:";
            this.xrLabel8.Font = new Font("Times New Roman", 11f);
            this.xrLabel8.LocationFloat = new PointFloat(601.2082f, 133f);
            this.xrLabel8.Name = "xrLabel8";
            this.xrLabel8.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel8.SizeF = new SizeF(214.4583f, 23.00002f);
            this.xrLabel8.StylePriority.UseFont = false;
            this.xrLabel8.Text = "[Professional]";
            this.xrLabel7.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel7.LocationFloat = new PointFloat(554.2917f, 102.2917f);
            this.xrLabel7.Name = "xrLabel7";
            this.xrLabel7.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel7.SizeF = new SizeF(100.4166f, 23.00002f);
            this.xrLabel7.StylePriority.UseFont = false;
            this.xrLabel7.Text = "Mức lương:";
            this.xrLabel6.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel6.LocationFloat = new PointFloat(175.2917f, 102.2917f);
            this.xrLabel6.Name = "xrLabel6";
            this.xrLabel6.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel6.SizeF = new SizeF(88.54166f, 22.99999f);
            this.xrLabel6.StylePriority.UseFont = false;
            this.xrLabel6.Text = "Điện thoại:";
            this.xrLabel5.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel5.LocationFloat = new PointFloat(175.2917f, 71.00002f);
            this.xrLabel5.Name = "xrLabel5";
            this.xrLabel5.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel5.SizeF = new SizeF(88.54166f, 22.99999f);
            this.xrLabel5.StylePriority.UseFont = false;
            this.xrLabel5.Text = "Địa chỉ:";
            this.xrLabel4.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel4.LocationFloat = new PointFloat(584.2082f, 40.79171f);
            this.xrLabel4.Name = "xrLabel4";
            this.xrLabel4.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel4.SizeF = new SizeF(70.50006f, 22.99999f);
            this.xrLabel4.StylePriority.UseFont = false;
            this.xrLabel4.Text = "CMND:";
            this.xrLabel3.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel3.LocationFloat = new PointFloat(175.2917f, 40.79169f);
            this.xrLabel3.Name = "xrLabel3";
            this.xrLabel3.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel3.SizeF = new SizeF(89.66663f, 22.99999f);
            this.xrLabel3.StylePriority.UseFont = false;
            this.xrLabel3.Text = "Ng\x00e0y sinh:";
            this.xrLabel2.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel2.LocationFloat = new PointFloat(584.2083f, 11.00006f);
            this.xrLabel2.Name = "xrLabel2";
            this.xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel2.SizeF = new SizeF(81.25f, 22.99999f);
            this.xrLabel2.StylePriority.UseFont = false;
            this.xrLabel2.Text = "Giới t\x00ednh:";
            this.xrLabel1.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrLabel1.LocationFloat = new PointFloat(175.2917f, 11.00006f);
            this.xrLabel1.Name = "xrLabel1";
            this.xrLabel1.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel1.SizeF = new SizeF(89.66663f, 22.99999f);
            this.xrLabel1.StylePriority.UseFont = false;
            this.xrLabel1.Text = "Họ v\x00e0 t\x00ean:";
            this.xrLine1.LineStyle = DashStyle.Dash;
            this.xrLine1.LocationFloat = new PointFloat(21.99999f, 168f);
            this.xrLine1.Name = "xrLine1";
            this.xrLine1.SizeF = new SizeF(793.6665f, 2.083333f);
            this.chSex.Font = new Font("Times New Roman", 11f);
            this.chSex.LocationFloat = new PointFloat(665.4583f, 11.00004f);
            this.chSex.Name = "chSex";
            this.chSex.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.chSex.SizeF = new SizeF(151.0416f, 22.99999f);
            this.chSex.StylePriority.UseFont = false;
            this.chSex.Text = "[Sex]";
            this.chSex.BeforePrint += new PrintEventHandler(this.chkSex_BeforePrint);
            this.xrLbPosition.Font = new Font("Times New Roman", 11f);
            this.xrLbPosition.LocationFloat = new PointFloat(267.0417f, 132.9999f);
            this.xrLbPosition.Name = "xrLbPosition";
            this.xrLbPosition.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLbPosition.SizeF = new SizeF(235.2082f, 23.00002f);
            this.xrLbPosition.StylePriority.UseFont = false;
            this.xrLbPosition.Text = "[Position]";
            this.xrLbSalary.Font = new Font("Times New Roman", 11f);
            this.xrLbSalary.LocationFloat = new PointFloat(654.7083f, 102.2916f);
            this.xrLbSalary.Name = "xrLbSalary";
            this.xrLbSalary.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLbSalary.SizeF = new SizeF(161.7915f, 23.00002f);
            this.xrLbSalary.StylePriority.UseFont = false;
            this.xrLbSalary.Text = "[BasicSalary!#,0]";
            this.xrLbPhone.Font = new Font("Times New Roman", 11f);
            this.xrLbPhone.LocationFloat = new PointFloat(267.0417f, 102.2916f);
            this.xrLbPhone.Name = "xrLbPhone";
            this.xrLbPhone.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLbPhone.SizeF = new SizeF(287.25f, 23.00002f);
            this.xrLbPhone.StylePriority.UseFont = false;
            this.xrLbPhone.Text = "[CellPhone]";
            this.xrLbAddress.Font = new Font("Times New Roman", 11f);
            this.xrLbAddress.LocationFloat = new PointFloat(267.0417f, 71.00001f);
            this.xrLbAddress.Name = "xrLbAddress";
            this.xrLbAddress.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLbAddress.SizeF = new SizeF(549.4581f, 23.00002f);
            this.xrLbAddress.StylePriority.UseFont = false;
            this.xrLbAddress.Text = "[MainAddress]";
            this.xrLbIDCard.Font = new Font("Times New Roman", 11f);
            this.xrLbIDCard.LocationFloat = new PointFloat(654.7083f, 40.79165f);
            this.xrLbIDCard.Name = "xrLbIDCard";
            this.xrLbIDCard.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLbIDCard.SizeF = new SizeF(161.7916f, 23.00002f);
            this.xrLbIDCard.StylePriority.UseFont = false;
            this.xrLbIDCard.Text = "[IDCard]";
            this.xrLbBirthDay.Font = new Font("Times New Roman", 11f);
            this.xrLbBirthDay.LocationFloat = new PointFloat(267.0417f, 40.79165f);
            this.xrLbBirthDay.Name = "xrLbBirthDay";
            this.xrLbBirthDay.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLbBirthDay.SizeF = new SizeF(317.1665f, 23.00002f);
            this.xrLbBirthDay.StylePriority.UseFont = false;
            this.xrLbBirthDay.Text = "[BirthdayDay]/[BirthdayMonth]/[BirthdayYear]";
            this.xrLbEmployeeName.Font = new Font("Times New Roman", 11f);
            this.xrLbEmployeeName.LocationFloat = new PointFloat(267.0417f, 11.00006f);
            this.xrLbEmployeeName.Multiline = true;
            this.xrLbEmployeeName.Name = "xrLbEmployeeName";
            this.xrLbEmployeeName.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLbEmployeeName.SizeF = new SizeF(317.1666f, 22.99999f);
            this.xrLbEmployeeName.StylePriority.UseFont = false;
            this.xrLbEmployeeName.Text = "[FirstName] [LastName]";
            this.txtEmployeeCode.BorderColor = Color.WhiteSmoke;
            this.txtEmployeeCode.Borders = BorderSide.All;
            this.txtEmployeeCode.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.txtEmployeeCode.LocationFloat = new PointFloat(22.00001f, 131.0001f);
            this.txtEmployeeCode.Name = "txtEmployeeCode";
            this.txtEmployeeCode.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtEmployeeCode.SizeF = new SizeF(143.75f, 22.99997f);
            this.txtEmployeeCode.StylePriority.UseBorderColor = false;
            this.txtEmployeeCode.StylePriority.UseBorders = false;
            this.txtEmployeeCode.StylePriority.UseFont = false;
            this.txtEmployeeCode.StylePriority.UseTextAlignment = false;
            this.txtEmployeeCode.Text = "[EmployeeCode]";
            this.txtEmployeeCode.TextAlignment = TextAlignment.TopCenter;
            this.TopMargin.HeightF = 44f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.winControlContainer2.LocationFloat = new PointFloat(208.9583f, 99.95834f);
            this.winControlContainer2.Name = "winControlContainer2";
            this.winControlContainer2.SizeF = new SizeF(362f, 33f);
            this.winControlContainer2.WinControl = this.lcHeaderText1;
            this.lcHeaderText1.Appearance.Font = new Font("Times New Roman", 21.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.lcHeaderText1.Appearance.Options.UseFont = true;
            this.lcHeaderText1.Location = new Point(0, 0);
            this.lcHeaderText1.Name = "lcHeaderText1";
            this.lcHeaderText1.Size = new Size(0x15c, 0x20);
            this.lcHeaderText1.TabIndex = 1;
            this.lcHeaderText1.Text = "DANH S\x00c1CH NH\x00c2N VI\x00caN ";
            this.BottomMargin.HeightF = 44f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.ReportHeader.Controls.AddRange(new XRControl[] { this.xrPanel1, this.txtCompany, this.txtUnit, this.ptLogo, this.txtWebsite, this.txtEmail, this.txtFax, this.txtTel, this.txtAddress, this.winControlContainer13, this.winControlContainer11, this.winControlContainer9, this.winControlContainer7, this.winControlContainer6, this.winControlContainer2 });
            this.ReportHeader.HeightF = 225f;
            this.ReportHeader.Name = "ReportHeader";
            this.xrPanel1.BackColor = Color.WhiteSmoke;
            this.xrPanel1.LocationFloat = new PointFloat(0f, 200f);
            this.xrPanel1.Name = "xrPanel1";
            this.xrPanel1.SizeF = new SizeF(827f, 25f);
            this.xrPanel1.StylePriority.UseBackColor = false;
            this.txtCompany.Font = new Font("Times New Roman", 14f, FontStyle.Bold);
            this.txtCompany.LocationFloat = new PointFloat(208.9583f, 138.9583f);
            this.txtCompany.Name = "txtCompany";
            this.txtCompany.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtCompany.SizeF = new SizeF(592.1249f, 20.83334f);
            this.txtCompany.StylePriority.UseFont = false;
            this.txtCompany.StylePriority.UseTextAlignment = false;
            this.txtCompany.Text = "txtCompany";
            this.txtCompany.TextAlignment = TextAlignment.MiddleLeft;
            this.txtUnit.Font = new Font("Times New Roman", 13f, FontStyle.Bold);
            this.txtUnit.LocationFloat = new PointFloat(208.9583f, 165.2917f);
            this.txtUnit.Name = "txtUnit";
            this.txtUnit.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtUnit.SizeF = new SizeF(592.1249f, 17.70834f);
            this.txtUnit.StylePriority.UseFont = false;
            this.txtUnit.StylePriority.UseTextAlignment = false;
            this.txtUnit.TextAlignment = TextAlignment.MiddleLeft;
            this.ptLogo.LocationFloat = new PointFloat(6.25f, 10.00001f);
            this.ptLogo.Name = "ptLogo";
            this.ptLogo.SizeF = new SizeF(196.875f, 182f);
            this.ptLogo.Sizing = ImageSizeMode.CenterImage;
            this.txtWebsite.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.txtWebsite.LocationFloat = new PointFloat(588.2083f, 57.45837f);
            this.txtWebsite.Name = "txtWebsite";
            this.txtWebsite.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtWebsite.SizeF = new SizeF(212.8749f, 18f);
            this.txtWebsite.StylePriority.UseFont = false;
            this.txtWebsite.Text = "txtWebsite";
            this.txtEmail.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.txtEmail.LocationFloat = new PointFloat(258.375f, 57.45837f);
            this.txtEmail.Name = "txtEmail";
            this.txtEmail.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtEmail.SizeF = new SizeF(255.875f, 17.99998f);
            this.txtEmail.StylePriority.UseFont = false;
            this.txtEmail.Text = "txtEmail";
            this.txtFax.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.txtFax.LocationFloat = new PointFloat(556.2082f, 33.29169f);
            this.txtFax.Name = "txtFax";
            this.txtFax.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtFax.SizeF = new SizeF(244.875f, 18f);
            this.txtFax.StylePriority.UseFont = false;
            this.txtFax.Text = "txtFax";
            this.txtTel.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.txtTel.LocationFloat = new PointFloat(294.0416f, 33.29169f);
            this.txtTel.Name = "txtTel";
            this.txtTel.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTel.SizeF = new SizeF(225.2084f, 18f);
            this.txtTel.StylePriority.UseFont = false;
            this.txtTel.Text = "txtTel";
            this.txtAddress.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.txtAddress.LocationFloat = new PointFloat(276.0417f, 10.00001f);
            this.txtAddress.Name = "txtAddress";
            this.txtAddress.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtAddress.SizeF = new SizeF(525.0415f, 18f);
            this.txtAddress.StylePriority.UseFont = false;
            this.txtAddress.Text = "txtAddress";
            this.winControlContainer13.LocationFloat = new PointFloat(521.1249f, 57.45837f);
            this.winControlContainer13.Name = "winControlContainer13";
            this.winControlContainer13.SizeF = new SizeF(61f, 18f);
            this.winControlContainer13.WinControl = this.labelControl5;
            this.labelControl5.Appearance.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.labelControl5.Appearance.Options.UseFont = true;
            this.labelControl5.Location = new Point(0, 0);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new Size(0x3b, 0x11);
            this.labelControl5.TabIndex = 14;
            this.labelControl5.Text = "Website:";
            this.winControlContainer11.LocationFloat = new PointFloat(208.9583f, 57.45834f);
            this.winControlContainer11.Name = "winControlContainer11";
            this.winControlContainer11.SizeF = new SizeF(44f, 18f);
            this.winControlContainer11.WinControl = this.labelControl4;
            this.labelControl4.Appearance.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.labelControl4.Appearance.Options.UseFont = true;
            this.labelControl4.Location = new Point(0, 0);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new Size(0x2a, 0x11);
            this.labelControl4.TabIndex = 12;
            this.labelControl4.Text = "Email:";
            this.winControlContainer9.LocationFloat = new PointFloat(521.5417f, 33.29167f);
            this.winControlContainer9.Name = "winControlContainer9";
            this.winControlContainer9.SizeF = new SizeF(30f, 18f);
            this.winControlContainer9.WinControl = this.labelControl3;
            this.labelControl3.Appearance.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.labelControl3.Appearance.Options.UseFont = true;
            this.labelControl3.Location = new Point(0, 0);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new Size(0x1d, 0x11);
            this.labelControl3.TabIndex = 10;
            this.labelControl3.Text = "Fax:";
            this.winControlContainer7.LocationFloat = new PointFloat(208.9583f, 33.29167f);
            this.winControlContainer7.Name = "winControlContainer7";
            this.winControlContainer7.SizeF = new SizeF(84f, 18f);
            this.winControlContainer7.WinControl = this.labelControl2;
            this.labelControl2.Appearance.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.labelControl2.Appearance.Options.UseFont = true;
            this.labelControl2.Location = new Point(0, 0);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new Size(0x51, 0x11);
            this.labelControl2.TabIndex = 8;
            this.labelControl2.Text = "Điện Thoại: ";
            this.winControlContainer6.LocationFloat = new PointFloat(208.9583f, 10.00001f);
            this.winControlContainer6.Name = "winControlContainer6";
            this.winControlContainer6.SizeF = new SizeF(56f, 18f);
            this.winControlContainer6.WinControl = this.labelControl1;
            this.labelControl1.Appearance.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.labelControl1.Appearance.Options.UseFont = true;
            this.labelControl1.Location = new Point(0, 0);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new Size(0x36, 0x11);
            this.labelControl1.TabIndex = 6;
            this.labelControl1.Text = "Địa Chỉ:";
            this.ReportFooter.HeightF = 8f;
            this.ReportFooter.Name = "ReportFooter";
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.ReportFooter });
            base.Margins = new Margins(0, 0, 0x2c, 0x2c);
            base.PageHeight = 0x491;
            base.PageWidth = 0x33b;
            base.PaperKind = PaperKind.A4;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.rptListEmployee1_BeforePrint);
            this.EndInit();
        }

        private void LoadAllData()
        {
            DataSet set = new DataSet();
            DataTable table = new DataTable();
            table = this.l_Employee.GetListCurrentNow(this.m_Level, this.m_Code, 1);
            set.Tables.Add(table);
            base.DataSource = set;
            base.DataMember = table.TableName;
            base.DataAdapter = table;
        }

        private void LoadLevel()
        {
            if (this.m_Level == 1)
            {
                HRM_BRANCH hrm_branch = new HRM_BRANCH();
                hrm_branch.Get(this.m_Code);
                this.txtUnit.Text = "Đơn vị: " + hrm_branch.BranchName;
            }
            else if (this.m_Level == 2)
            {
                HRM_DEPARTMENT hrm_department = new HRM_DEPARTMENT();
                hrm_department.Get(this.m_Code);
                this.txtUnit.Text = "Đơn vị: " + hrm_department.DepartmentName;
            }
            else if (this.m_Level == 3)
            {
                HRM_GROUP hrm_group = new HRM_GROUP();
                hrm_group.Get(this.m_Code);
                this.txtUnit.Text = "Đơn vị: " + hrm_group.GroupName;
            }
        }

        private void ptEmployeePhoto_BeforePrint(object sender, PrintEventArgs e)
        {
            HRM_EMPLOYEE hrm_employee = new HRM_EMPLOYEE();
            hrm_employee.Get(this.txtEmployeeCode.Text);
            this.ptEmployeePhoto.Image = hrm_employee.Photo;
        }

        private void rptListEmployee1_BeforePrint(object sender, PrintEventArgs e)
        {
            this.LoadLevel();
            this.LoadAllData();
            ////if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.txtCompany.Text = "";//MyInfo.Company;
                this.txtAddress.Text = "";//MyInfo.Address;
                this.txtTel.Text = "";//MyInfo.Tel;
                this.txtEmail.Text = "";//MyInfo.Email;
                this.txtWebsite.Text = "";// MyInfo.WebSite;
                this.txtFax.Text = "";//MyInfo.Fax;
                this.ptLogo.Image = null;//MyInfo.Photo;
            }
            CreateFooterReport.CreateFooter("IsOther", this.ReportFooter, this);
        }
    }
}

